<style>
    .opinion {
	padding: 0px 10px;
    }
    .opinion .content {
	margin-left: 70px;
    }
    .opinion .info {
	margin-left: 70px;
    }
    .opinion .info .rating {
	text-align: right;
	float:right;
    }
    .posts {
	padding-left: 50px;
    }
</style>
{foreach $opinions AS $opinion}
<div class="opinion">
    <img class="icon" src="{$baseUri . 'storage/users/' . $opinion->userId .'jpg', 50|thumbnail}" />
    <div class="info">
	<img class="rating" src="{$baseUri}img/rating_{$opinion->rating}.png" />
		{$opinion->inserted|date} | <strong class="author">{$opinion->userName}</strong>
    </div>
    <div class="content">
		{!=$opinion->content|texy}
    </div>
    <div class="posts">
	{if isset($showedOpinion) && $showedOpinion == $opinion->getId()}
	    <div class="posts">
	    {widget postList}
	    </div>
	{else}
	    {if isset($discussions[$opinion->getId()])}
		<a href="{link showPosts, $opinion->getId()}" class="show">{_'Show %d comments',$discussions[$opinion->getId()]}</a>
	    {/if}
	{/if}
    </div>
</div>
<hr style="clear:both; visibility:hidden" />
{/foreach}

{widget paginator}